
Create PROC [dbo].[sp_HoaDon_Insert](
	@TongTien				Float,
	@MaKhachHang			Int,
	@Output					INT OUTPUT
)
AS
BEGIN
DECLARE @Ngay_cap_nhat_cuoi datetime
	SET @Ngay_cap_nhat_cuoi = getdate()
INSERT INTO HoaDon(	
					tong_tien,
					ma_khach_hang,
					ngay_lap
					) 
			VALUES(	
					@TongTien,
					@MaKhachHang,
					@Ngay_cap_nhat_cuoi
					)

SET @Output = SCOPE_IDENTITY()
END
